package com.starmark.sys.login.provider.web;


import com.starmark.auth.common.dto.SecurityUser;
import com.starmark.auth.common.util.UserUtil;
import com.starmark.core.framework.base.AbstractController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author starmark
 * @create 2020-01-18 22:18
 */
@RestController
@Api(
        value = "系统用户信息",
        description = "系统用户信息"
)
@RequestMapping(value = "/sys/userinfo")
public class UserInfoController extends AbstractController {





    @ApiOperation(value = "当前用户信息")
    @GetMapping("/getUserInfo")
    public SecurityUser getUserInfo() {
       return  UserUtil.getCurrentUser();
    }



}



